 #define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	float i = 1.0f;
	float j = 0;
	float sum = 0.0f;
	int flag = 1;
	for (i = 1; i <= 100; i++)
	{
		j = 1 / i;
		sum = sum + j*flag;
		flag = -flag;
	}
	printf("%f", sum);
	return 0;
}